<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<title>Selections &mdash; Intype Documentation</title>
		<link rel="stylesheet" href="css/static.css" type="text/css" />
		<link rel="stylesheet" href="css/content.css" type="text/css" />
	</head>
	<body>
		<div id="page"><div id="page-inner">

			<div id="sub-header"><div id="sub-header-inner">
				&nbsp;
			</div></div>

			<div id="cols">

				<div id="nav">
					<div id="nav-inner">
						<h1>Manual</h1>
						<ul>
							<li><a href="introduction.html" class="title"><span>Introduction</span></a></li>
							<li><a href="editing.html" class="title"><span>Editing</span></a>
							<ul>
								<li><a href="selections.html" class="title"><span>Selections</span></a></li>
								<li><a href="find_and_replace.html" class="title"><span>Find & Replace</span></a></li>
							</ul>
							</li>
							<li><a href="preferences.html" class="title"><span>Preferences</span></a>
							<ul>
								<li><a href="appearance_preferences.html" class="title"><span>Appearance Preferences</span></a></li>
							</ul>
							</li>
							
							<li><a href="scopes.html" class="title"><span>Scopes</span></a>
							<ul>
								<li><a href="document_scopes.html" class="title"><span>Document Scopes</span></a></li>
								<li><a href="application_scopes.html" class="title"><span>Application Scopes</span></a></li>
								<li><a href="scope_selectors.html" class="title"><span>Scopes Selectors</span></a></li>
								<li><a href="scope_naming_conventions.html" class="title"><span>Naming Conventions</span></a></li>
							</ul>
							</li>
							
							<li><a href="bundles.html" class="title"><span>Bundles</span></a>
							<ul>
								<li><a href="bundle_items.html" class="title"><span>Bundle Items</span></a></li>
								<li><a href="scopes.html" class="title"><span>Scopes</span></a></li>
								<li><a href="snippets.html" class="title"><span>Snippets</span></a></li>
								<li><a href="languages.html" class="title"><span>Languages</span></a></li>
								<li><a href="built_in_bundles.html" class="title"><span>Built-In Bundles</span></a></li>
							</ul>
							</li>
							<li><span class="title missing"><span>appendix</span></span>
							<ul>
								<li><a href="jasmine.html" class="title"><span>Jasmine</span></a></li>
								<li><a href="regular_expressions.html" class="title"><span>Regular Expressions</span></a></li>
							</ul>
							</li>
						</ul>
					</div>
				</div>

				<div id="content">
					<div id="content-right">
						<div id="content-left">
							<div id="content-inner">
								<h1>Selections</h1>

<p>In Intype, you can use one or more selection ranges. Each range can select text or be empty. The behavior is set by modifiers used to create the ranges. Selection model is designed to not interferre with standard using single text selection behavior well known from  other editors, and to still allow using powerful multiple or rectangle selections.</p>

<h2>Types of Selection</h2>

<p>In current version, Intype supports three basic types of selection:</p>

<ul>
<li><strong>Normal Selection</strong> is a standard selection consisting of one non-empty range. </li>
<li><strong>Multiple Selection</strong> is advanced selection type consisting of one or more non-empty (selecting at least one character) or empty ranges.</li>
<li><strong>Rectangular Selection</strong> is basically a <em>Multiple Selection</em> with ranges aligned to a rectangle area. Each row of the rectangle is one selection range.</li>
</ul>

<h2>Normal Selection</h2>

<p><em>Normal Selection</em> works similar to other editor's selection. You can use <em>Shift+Arrows</em> or mouse click &amp; drag way of creating the selection.</p>

<h2>Multiple Selection</h2>

<p><em>Multiple Selection</em> can be created by holding down <em>Ctrl</em> modifier key and clicking, double-clicking or draggin the mouse curosr in the text.</p>

<ul>
<li><em>Ctrl+Click</em> selects empty range at mouse cursor position.</li>
<li><em>Ctrl+Double-Click</em> selects word under the mouse cursor</li>
<li><em>Ctrl+Click &amp; Drag</em> adds next region. Releasing the mouse button results in mergin all overlapping selection ranges.</li>
</ul>

<p>Note that <em>Ctrl</em> must be pressed down before clicking on the mouse button.</p>

<p>ToDo: Screencast creating the multiple selection</p>

<p>Typing or pasting from clipboard copies text to each range. Launching a snippet that is working with selection (various wrapping or transformation snippets) are applied to each range separately.</p>

<h2>Rectangular Selection</h2>

<p><em>Rectangular Selection</em> can be created with Alt and arrow keys, or Alt and mouse button. Each row of the selection is separate range, so the selection behaves just like <em>Multiple Selection</em> described above.</p>

<p>You cannot create multiple rectangles, but you can add more ranges using <em>Multiple Selection</em>.</p>

<p>As a result of being a specialization of the <em>Multiple Selection</em>, typing text, or launching a snippet has the same effect.</p>

<h2>Modifying Selection Ranges</h2>

<p>Modifying regions requires a little knowledge of the internal anatomy of the region described in this picture:</p>

<p>ToDo: Selection range anatomy</p>

<p>You can modify both sides of any range created. The one with caret at the ending position is currently active. You can simply use <em>Shift+Click</em> to move the ending position.</p>

<p>For precise range modification see this screencast:</p>

<p>ToDo: Modifying range screencast</p>

<h2>Working with Empty Ranges</h2>

<p>Selection range is allowed to be empty. Empty range can be created either by the <em>Multiple Selection</em> or <em>Rectangle Selection</em>. It's handy when you want to insert text between two characters in the text on multiple places.</p>

<p>ToDo: Screencast of working with empty ranges</p>

<h2>Selecting Lines</h2>

<p>To select current line you can use <strong>Select Lines</strong> (<em>Ctrl+Shift+L</em>) command. However, the command is more powerful when combined with various types of selection.</p>

<p>With <em>Normal Selection</em>, command aligns the range to lines. This results in one continuos range spreading over lines with selection.</p>

<p>With <em>Multiple Selection</em> or <em>Rectangle Selection</em>, the command wraps every line with selection in one separate range. This feature can be used to wrap each line in snippet. </p>

<p>Note that the selection always ends before the hard break character of the last line.</p>

<h2>Selection Conversions</h2>

<p>Not implemented yet.</p>
							</div>
						</div>
					</div>
				</div>

			</div>

		</div>

		</div>
	</body>
</html>